package com.woniu.immunologicalmechanism.service.impl;

import com.woniu.common.entity.ResponseResult;

public class ResultUtil {



    public static void insertOk(ResponseResult result) {
            result.setCode(200);
            result.setMessage("添加成功");
    }
    public static void error(ResponseResult result) {
            result.setCode(500);
            result.setMessage("服务繁忙，请等待...");
    }

    public static void updateOk(ResponseResult result) {
        result.setCode(200);
        result.setMessage("修改成功");
    }

    public static void deleteOk(ResponseResult result) {
        result.setCode(200);
        result.setMessage("删除成功");
    }

    public static void selectOk(ResponseResult result) {
        result.setCode(200);
        result.setMessage("查询成功");
    }

    public static ResponseResult empty(ResponseResult result) {
        result.setCode(400);
        result.setMessage("不能为空");
        return result;
    }
}
